﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Linq;
using System.Threading.Tasks;

namespace HigLabo.Net.SugarSync
{
    /// <summary>
    /// 
    /// </summary>
    public partial class SugarSyncClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<Boolean> AuthenticateAsync()
        {
            return AsyncCall<Boolean>(this.Authenticate);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<String> GetAuthorizationTokenAsync()
        {
            return AsyncCall<String>(this.GetAuthorizationToken);
        }
        
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<User> GetUserInfoAsync()
        {
            return AsyncCall<User>(this.GetUserInfo);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<CollectionContents> GetCollectionsAsync(GetCollectionsCommand command)
        {
            return AsyncCall<GetCollectionsCommand, CollectionContents>(this.GetCollections, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Workspace> GetWorkspaceAsync(GetWorkspacesCommand command)
        {
            return AsyncCall<GetWorkspacesCommand, Workspace>(this.GetWorkspace, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Workspace> UpdateWorkspaceNameAsync(UpdateWorkspaceNameCommand command)
        {
            return AsyncCall<UpdateWorkspaceNameCommand, Workspace>(this.UpdateWorkspaceName, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> GetFolderAsync(GetFoldersCommand command)
        {
            return AsyncCall<GetFoldersCommand, Folder>(this.GetFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> CreateFolderAsync(CreateFoldersCommand command)
        {
            return AsyncCall<CreateFoldersCommand, String>(this.CreateFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> DeleteFolderAsync(DeleteFoldersCommand command)
        {
            return AsyncCall<DeleteFoldersCommand, String>(this.DeleteFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> UpdateFolderNameAsync(UpdateFolderNameCommand command)
        {
            return AsyncCall<UpdateFolderNameCommand, String>(this.UpdateFolderName, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<ReceivedShareCollection> GetReceivedSharesAsync(GetReceivedSharesCommand command)
        {
            return AsyncCall<GetReceivedSharesCommand, ReceivedShareCollection>(this.GetReceivedShares, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> GetFileAsync(GetFileCommand command)
        {
            return AsyncCall<GetFileCommand, File>(this.GetFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> CreateFileAsync(CreateFileCommand command)
        {
            return AsyncCall<CreateFileCommand, String>(this.CreateFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> UpdateFileAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, File>(this.UpdateFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> DeleteFileAsync(DeleteFileCommand command)
        {
            return AsyncCall<DeleteFileCommand, String>(this.DeleteFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> CopyFileAsync(CopyFileCommand command)
        {
            return AsyncCall<CopyFileCommand, String>(this.CopyFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Byte[]> GetFileDataAsync(GetFileDataCommand command)
        {
            return AsyncCall<GetFileDataCommand, Byte[]>(this.GetFileData, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<String> PutFileDataAsync(PutFileDataCommand command)
        {
            return AsyncCall<PutFileDataCommand, String>(this.PutFileData, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<FileVersions> GetVersionHistoryAsync(GetVersionHistoryCommand command)
        {
            return AsyncCall<GetVersionHistoryCommand, FileVersions>(this.GetVersionHistory, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<File> CreatePublicLinkAsync(PublicLinkCommand command)
        {
            return AsyncCall<PublicLinkCommand, File>(this.CreatePublicLink, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> DestroyPublicLinkAsync(PublicLinkCommand command)
        {
            return AsyncCall<PublicLinkCommand, File>(this.DestroyPublicLink, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Albums> GetAlbumAsync(GetAlbumsCommand command)
        {
            return AsyncCall<GetAlbumsCommand, Albums>(this.GetAlbum, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<CollectionContents> GetAlbumsCollectionContentsAsync(GetAlbumsCollectionCommand command)
        {
            return AsyncCall<GetAlbumsCollectionCommand, CollectionContents>(this.GetAlbumsCollectionContents, command);
        }
    }
}